import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: '/',
    redirect: '/index'
  }, {
    path: '/index',
    name: 'index',
    component: () => import('../views/Index.vue')
  }, {
    path: '/article',
    name: 'article',
    component: () => import('../views/Article.vue')
  }, {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue')
  }, {
    path: '/art',
    name: 'art',
    component: () => import('../views/Art.vue')
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
